/* GUI CONVERTED from rqarp.i (converter v1.75) Tue Jun 26 01:08:18 2001 */
/* rqarp.i - Approver Report Record Selection                               */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                      */
/* All rights reserved worldwide.  This is an unpublished work.             */
/* $Revision: 1.2 $                                                         */
/*V8:ConvertMode=FullGUIReport                                              */
/* $Revision: 1.2 $    BY: Mugdha Tambe      DATE: 06/19/01 ECO: *N0Y9*     */

/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/


/*GUI global preprocessor directive settings */
&GLOBAL-DEFINE PP_PGM_RP TRUE
&GLOBAL-DEFINE PP_ENV_GUI TRUE


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

for each rqa_mstr where
   (rqa_apr >= approver        and rqa_apr <= approver1)        and
   (rqa_entity >= entity       and rqa_entity <= entity1)       and
   (rqa_category >= category   and rqa_category <= category1)   and
   (rqa_sub_from >= sub_acct   and rqa_sub_to <= sub_acct1)     and
   (rqa_cc_from >= cost_ctr    and rqa_cc_to <= cost_ctr1)      and
   (rqa_job >= job_name        and rqa_job <= job_name1)        and
   (rqa_site >= site           and rqa_site <= site1)           and
   (rqa_prod_line >= prod_line and rqa_prod_line <= prod_line1) and
   (rqa_apr_level >= apr_level and rqa_apr_level <= apr_level1) and
   (rqa_rvw_level >= rvw_level and rqa_rvw_level <= rvw_level1)
   and ((include_horizontal and rqa_type = horizontal) or
        (include_vertical and rqa_type = vertical) or
        (include_job and rqa_type = JOB) or
        (include_prod_line and rqa_type = DIRECT))
   and ((rqa_start <= start_date or rqa_start = ?) and
        (rqa_end >= start_date or rqa_end = ?))
   no-lock
   break by {&bycl} by rqa_apr with frame c2 width 132 down:

   /*  RETRIEVE NAMES/DESCRIPTIONS  */
   {rqadesc.i}

   /*  RETRIEVE LANGUAGE DETAIL */
   {gplngn2a.i
       &file=""rqa_mstr""
       &field=""rqa_type""
       &code=string(rqa_type)
       &mnemonic=var_type_code
       &label=var_type_desc}

   if first-of ( {&bycl}  )
   then do :

      page.

      CASE "{&bycl}" :
         when "rqa_type" then
         do:
            assign
               l_field1 = getTermLabel("TYPE",5) + ":"
               v_desc   = var_type_desc .
         end.
         when "rqa_category" then
         do:
            assign
               l_field1 = getTermLabel("CATEGORY",11) + ":"
               v_desc   = var_category_desc .
         end.
         when "rqa_cc_from" then
         do:
            assign
               l_field1 = getTermLabel("COST_CENTER",15) + ":"
               v_desc   = var_cc_from_desc.
         end.
         when "rqa_entity" then
         do:
            assign
               l_field1 = getTermLabel("ENTITY",9) + ":"
               v_desc   = var_entity_name.
         end.
         when "rqa_sub_from" then
         do:
            assign
               l_field1 = getTermLabel("SUB_ACCOUNT",15) + ":"
               v_desc   = var_sub_from_desc.
         end.
      END CASE. /* CASE "{&bycl}"  */

      display
         l_field1
         trim(string({&bycl})) @ l_field2
         v_desc
      with  frame h1 side-labels STREAM-IO /*GUI*/ .

   end. /* IF FIRST-OF ( {&bycl}  ) THEN DO : */

   if page-size - line-counter < 3 then do :
      page .
      if not first-of({&bycl})
      then
         display
            l_field1
            trim(string({&bycl})) @ l_field2
            v_desc
            l_cont
         with frame h2 side-labels STREAM-IO /*GUI*/ .
   end.

   display
      rqa_apr
      rqa_apr_level
      var_apr_level_amt
      rqa_apr_req
      rqa_entity
      rqa_category
      rqa_sub_from
      rqa_cc_from
      rqa_start
      rqa_site
   with frame c2 down width 132 STREAM-IO /*GUI*/ .

   down 1 with frame c2.

   if page-size - line-counter < 3 then do :
      page .
      if not first-of({&bycl})
      then
         display
            l_field1
            trim(string({&bycl})) @ l_field2
            v_desc
            l_cont
         with frame h2 side-labels STREAM-IO /*GUI*/ .
   end.

   display
      var_apr_name format "x(30)" @ rqa_apr
      rqa_rvw_level               @ rqa_apr_level
      var_rvw_level_amt           @ var_apr_level_amt
      rqa_rvw_req                 @ rqa_apr_req
      rqa_job                     @ rqa_entity
      trim(substring(var_type_desc,1,1)) format "x(1)" @ rqa_category
      rqa_sub_to                  @ rqa_sub_from
      rqa_cc_to                   @ rqa_cc_from
      rqa_end                     @ rqa_start
      rqa_prod_line               @ rqa_site
   with frame c2 down width 132 STREAM-IO /*GUI*/ .

   down 1 with frame c2.

   rqcd_det_cntr = 0.

   if page-size - line-counter < 3 then do :
      page .
      if not first-of({&bycl})
      then
         display
            l_field1
            trim(string({&bycl})) @ l_field2
            v_desc
            l_cont
         with frame h2 side-labels STREAM-IO /*GUI*/ .
   end.

   if print_details
   then do :

      display
         space(20)
         rqa_alt_apr[1]
         var_alt1_apr_name
         rqa_admin_apr
         var_admin_apr_name
      with frame details down width 132 STREAM-IO /*GUI*/ .

      if rqa_alt_apr[2] <> ""
      then do :
         down with frame details .
         display
            rqa_alt_apr[2] @ rqa_alt_apr[1]
            var_alt2_apr_name @ var_alt1_apr_name
         with frame details down width 132 STREAM-IO /*GUI*/ .
      end. /* IF rqa_alt_apr[2] <> "" */

   end.  /* IF print_details */

   down with frame c2 .

   
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/


end. /* FOR EACH rqa_mstr */
